package com.mallcai.bigdata.uid;

import com.mallcai.bigdata.uid.bean.Id;
import com.mallcai.bigdata.uid.exception.UidGenerateException;

/**
 * described :
 * Created by oneape<oneape15@163.com> on 2019-04-04 10:45.
 * Modify:
 */
public interface IUidGenerator {

    /**
     * create a uid
     *
     * @return long
     * @throws UidGenerateException e
     */
    long getUid() throws UidGenerateException;

    /**
     * parse the uid
     *
     * @param uId long
     * @return Id {@link Id}
     */
    Id parseUid(long uId);
}
